package day03;

public class OperDemo {
    public static void main(String[] args) {





        /*
        int a=18,b=115;
        int min=a<b?a:b;
        int max=a>b?a:b;
        System.out.println(min);
        System.out.println(max);
         */
        /*
        System.out.println(10+20+" "+30);//30 30
        System.out.println(10+20+30+" ");//60
        System.out.println(" "+10+20+30);// 102030
        System.out.println(10+" "+20+30);//10 2030

         */
        /*
        int age=60;
        System.out.println("age=");//age=
        System.out.println(age);//60
        System.out.println("我今年"+age+"岁了");//我今年60岁了

        String name="YJS";
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+",今年"+age+"岁了");
         */

        /*
        short a=5;
        a +=5;
        System.out.println(a);//10
        a -=4;
        System.out.println(a);//6
        a *=5;
        System.out.println(a);//30
        a /=2;
        System.out.println(a);//15
        a %=6;
        System.out.println(a);//3
        short b=55;
        //b=b+6;//需要强转，b=(short)(b+6)
        b+=6;
        System.out.println(b);
         */

        /*
        int a=5,b=10,c=5;
        boolean d=a>b && a++>3;
        System.out.println(d);//flase
        System.out.println(a);//5
         */

        /*
        System.out.println(!(a>b));//!false=true
        System.out.println(!(b>c));//!true=false
         */

        /*
        boolean d=a<b || b>c;
        System.out.println(d);//true
        System.out.println(a>b||a==c);//true
        System.out.println(a>=c||a<b);//true
        System.out.println(a!=c || b<c);//false
        int score=88;
        System.out.println(score<0 || score>100);//false
         */

        /*
        boolean d=a>b && b>c;
        System.out.println(d);//false
        System.out.println(a==c && a>b);//false
        System.out.println(a>c && b<c);//false
        System.out.println(a==c && b>c);//true
        int age=38;
        System.out.println(age>=24 && age<=50);//true
         */

        /*
        int a=5,b=10,c=5;
        boolean d=c>a;
        System.out.println(d);//false
        System.out.println(a>b);//false
        System.out.println(a==b);//false
        System.out.println(a==c);//true
        System.out.println(a>=b);//false
        System.out.println(a<=b);//true
        System.out.println(a!=c);//false
        System.out.println(a+c>=b);//true
        System.out.println(a*c<b);//false
        System.out.println(a++<c);//false--------a自增1变为6
        System.out.println(++c==a);//true--------c自增1变为6
        System.out.println(a--==c);//true -------a自减1变为5
        System.out.println(--c==a);//true -------c自减1变为5
         */

        /*
        //++/--
        /1.++
         1）单独使用时，在前在后都一样
         2)被使用时，在前在后不一样
               a++的值为a
              ++a的值为a+1
        int a=5,b=5;
        a++;
        b++;
        System.out.println(a);//6
        System.out.println(b);//6
        int c=a++;//将a++的值5赋给c，同时a自增1
        int d=++b;//将++b的值6赋给d，同时b自增1
        System.out.println(a);//7
        System.out.println(b);//7
        System.out.println(c);//6
        System.out.println(d);//7
         */

        /*
        int a=5,b=5;
        a--;
        --b;
        System.out.println(a);//4
        System.out.println(b);//4
        int c=a--;
        int d=--b;
        System.out.println(a);//3
        System.out.println(b);//3
        System.out.println(c);//4
        System.out.println(d);//3
         */


    }
}
